/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package za.ac.cput.inathi.designpatterns.bridge;

import com.sun.xml.internal.ws.api.pipe.Engine;

/**
 *
 * @author 209007044
 */
public abstract class Vehicle {

    Enginne engine;
    int weightInKilos;

    public abstract void drive();

    public void setEngine(Enginne engine) {
        this.engine = engine;
    }

    public void reportOnSpeed(int horsepower) {
        int ratio = weightInKilos / horsepower;
        if (ratio < 3) {
            System.out.println("The vehicle is going at a fast speed.");
        } else if ((ratio >= 3) && (ratio < 8)) {
            System.out.println("The vehicle is going an average speed.");
        } else {
            System.out.println("The vehicle is going at as low speed.");
        }
    }
}
